Optimal. Leaf size=101 \[ \frac {\cot (e+f x)}{2 a c f \sqrt {a+a \sec (e+f x)} \sqrt {c-c \sec (e+f x)}}+\frac {\log (\sin (e+f x)) \tan (e+f x)}{a c f \sqrt {a+a \sec (e+f x)} \sqrt {c-c \sec (e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 101, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {3990, 3554,
3556} \begin {gather*} \frac {\cot (e+f x)}{2 a c f \sqrt {a \sec (e+f x)+a} \sqrt {c-c \sec (e+f x)}}+\frac {\tan (e+f x) \log (\sin (e+f x))}{a c f \sqrt {a \sec (e+f x)+a} \sqrt {c-c \sec (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3554
Rule 3556
Rule 3990
Rubi steps
\begin {align*} \int \frac {1}{(a+a \sec (e+f x))^{3/2} (c-c \sec (e+f x))^{3/2}} \, dx &=-\frac {\tan (e+f x) \int \cot ^3(e+f x) \, dx}{a c \sqrt {a+a \sec (e+f x)} \sqrt {c-c \sec (e+f x)}}\\ &=\frac {\cot (e+f x)}{2 a c f \sqrt {a+a \sec (e+f x)} \sqrt {c-c \sec (e+f x)}}+\frac {\tan (e+f x) \int \cot (e+f x) \, dx}{a c \sqrt {a+a \sec (e+f x)} \sqrt {c-c \sec (e+f x)}}\\ &=\frac {\cot (e+f x)}{2 a c f \sqrt {a+a \sec (e+f x)} \sqrt {c-c \sec (e+f x)}}+\frac {\log (\sin (e+f x)) \tan (e+f x)}{a c f \sqrt {a+a \sec (e+f x)} \sqrt {c-c \sec (e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 1.61, size = 121, normalized size = 1.20 \begin {gather*} \frac {\left (1-i f x+\cos (2 (e+f x)) \left (i f x-\log \left (1-e^{2 i (e+f x)}\right )\right )+\log \left (1-e^{2 i (e+f x)}\right )\right ) \sec ^2(e+f x) \tan (e+f x)}{2 c f (-1+\sec (e+f x)) (a (1+\sec (e+f x)))^{3/2} \sqrt {c-c \sec (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.26, size = 175, normalized size = 1.73
method | result | size |
default | \(\frac {\left (-1+\cos \left (f x +e \right )\right )^{2} \left (4 \left (\cos ^{2}\left (f x +e \right )\right ) \ln \left (-\frac {-1+\cos \left (f x +e \right )}{\sin \left (f x +e \right )}\right )-4 \left (\cos ^{2}\left (f x +e \right )\right ) \ln \left (\frac {2}{\cos \left (f x +e \right )+1}\right )-\left (\cos ^{2}\left (f x +e \right )\right )-4 \ln \left (-\frac {-1+\cos \left (f x +e \right )}{\sin \left (f x +e \right )}\right )+4 \ln \left (\frac {2}{\cos \left (f x +e \right )+1}\right )-1\right ) \sqrt {\frac {a \left (\cos \left (f x +e \right )+1\right )}{\cos \left (f x +e \right )}}}{4 f \sin \left (f x +e \right )^{3} \left (\frac {c \left (-1+\cos \left (f x +e \right )\right )}{\cos \left (f x +e \right )}\right )^{\frac {3}{2}} \cos \left (f x +e \right ) a^{2}}\) | \(175\) |
risch | \(\frac {\left ({\mathrm e}^{i \left (f x +e \right )}+1\right ) \left ({\mathrm e}^{i \left (f x +e \right )}-1\right ) x}{a c \sqrt {\frac {a \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )^{2}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}}\, \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) \sqrt {\frac {c \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )^{2}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}}}-\frac {2 \left ({\mathrm e}^{i \left (f x +e \right )}+1\right ) \left ({\mathrm e}^{i \left (f x +e \right )}-1\right ) \left (f x +e \right )}{a c \sqrt {\frac {a \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )^{2}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}}\, \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) \sqrt {\frac {c \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )^{2}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}}\, f}+\frac {2 i {\mathrm e}^{2 i \left (f x +e \right )}}{a c \left ({\mathrm e}^{i \left (f x +e \right )}+1\right ) \sqrt {\frac {a \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )^{2}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}}\, \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) \left ({\mathrm e}^{i \left (f x +e \right )}-1\right ) \sqrt {\frac {c \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )^{2}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}}\, f}-\frac {i \left ({\mathrm e}^{i \left (f x +e \right )}+1\right ) \left ({\mathrm e}^{i \left (f x +e \right )}-1\right ) \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )}{a c \sqrt {\frac {a \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )^{2}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}}\, \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) \sqrt {\frac {c \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )^{2}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}}\, f}\) | \(455\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 527 vs.
\(2 (98) = 196\).
time = 0.57, size = 527, normalized size = 5.22 \begin {gather*} -\frac {{\left ({\left (f x + e\right )} \cos \left (4 \, f x + 4 \, e\right )^{2} + 4 \, {\left (f x + e\right )} \cos \left (2 \, f x + 2 \, e\right )^{2} + {\left (f x + e\right )} \sin \left (4 \, f x + 4 \, e\right )^{2} + 4 \, {\left (f x + e\right )} \sin \left (2 \, f x + 2 \, e\right )^{2} + f x + {\left (2 \, {\left (2 \, \cos \left (2 \, f x + 2 \, e\right ) - 1\right )} \cos \left (4 \, f x + 4 \, e\right ) - \cos \left (4 \, f x + 4 \, e\right )^{2} - 4 \, \cos \left (2 \, f x + 2 \, e\right )^{2} - \sin \left (4 \, f x + 4 \, e\right )^{2} + 4 \, \sin \left (4 \, f x + 4 \, e\right ) \sin \left (2 \, f x + 2 \, e\right ) - 4 \, \sin \left (2 \, f x + 2 \, e\right )^{2} + 4 \, \cos \left (2 \, f x + 2 \, e\right ) - 1\right )} \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right ) - 1\right ) + 2 \, {\left (f x - 2 \, {\left (f x + e\right )} \cos \left (2 \, f x + 2 \, e\right ) + e + \sin \left (2 \, f x + 2 \, e\right )\right )} \cos \left (4 \, f x + 4 \, e\right ) - 4 \, {\left (f x + e\right )} \cos \left (2 \, f x + 2 \, e\right ) - 2 \, {\left (2 \, {\left (f x + e\right )} \sin \left (2 \, f x + 2 \, e\right ) + \cos \left (2 \, f x + 2 \, e\right )\right )} \sin \left (4 \, f x + 4 \, e\right ) + e + 2 \, \sin \left (2 \, f x + 2 \, e\right )\right )} \sqrt {a} \sqrt {c}}{{\left (a^{2} c^{2} \cos \left (4 \, f x + 4 \, e\right )^{2} + 4 \, a^{2} c^{2} \cos \left (2 \, f x + 2 \, e\right )^{2} + a^{2} c^{2} \sin \left (4 \, f x + 4 \, e\right )^{2} - 4 \, a^{2} c^{2} \sin \left (4 \, f x + 4 \, e\right ) \sin \left (2 \, f x + 2 \, e\right ) + 4 \, a^{2} c^{2} \sin \left (2 \, f x + 2 \, e\right )^{2} - 4 \, a^{2} c^{2} \cos \left (2 \, f x + 2 \, e\right ) + a^{2} c^{2} - 2 \, {\left (2 \, a^{2} c^{2} \cos \left (2 \, f x + 2 \, e\right ) - a^{2} c^{2}\right )} \cos \left (4 \, f x + 4 \, e\right )\right )} f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 241 vs.
\(2 (98) = 196\).
time = 2.34, size = 532, normalized size = 5.27 \begin {gather*} \left [-\frac {9 \, \sqrt {-a c} {\left (\cos \left (f x + e\right )^{2} - 1\right )} \log \left (-\frac {8 \, {\left ({\left (256 \, \cos \left (f x + e\right )^{5} - 512 \, \cos \left (f x + e\right )^{3} + 175 \, \cos \left (f x + e\right )\right )} \sqrt {-a c} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sqrt {\frac {c \cos \left (f x + e\right ) - c}{\cos \left (f x + e\right )}} - {\left (256 \, a c \cos \left (f x + e\right )^{4} - 512 \, a c \cos \left (f x + e\right )^{2} + 337 \, a c\right )} \sin \left (f x + e\right )\right )}}{{\left (\cos \left (f x + e\right )^{2} - 1\right )} \sin \left (f x + e\right )}\right ) \sin \left (f x + e\right ) + {\left (16 \, \cos \left (f x + e\right )^{3} - 25 \, \cos \left (f x + e\right )\right )} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sqrt {\frac {c \cos \left (f x + e\right ) - c}{\cos \left (f x + e\right )}}}{18 \, {\left (a^{2} c^{2} f \cos \left (f x + e\right )^{2} - a^{2} c^{2} f\right )} \sin \left (f x + e\right )}, -\frac {18 \, \sqrt {a c} {\left (\cos \left (f x + e\right )^{2} - 1\right )} \arctan \left (\frac {{\left (16 \, \cos \left (f x + e\right )^{3} - 7 \, \cos \left (f x + e\right )\right )} \sqrt {a c} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sqrt {\frac {c \cos \left (f x + e\right ) - c}{\cos \left (f x + e\right )}}}{{\left (16 \, a c \cos \left (f x + e\right )^{2} - 25 \, a c\right )} \sin \left (f x + e\right )}\right ) \sin \left (f x + e\right ) + {\left (16 \, \cos \left (f x + e\right )^{3} - 25 \, \cos \left (f x + e\right )\right )} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sqrt {\frac {c \cos \left (f x + e\right ) - c}{\cos \left (f x + e\right )}}}{18 \, {\left (a^{2} c^{2} f \cos \left (f x + e\right )^{2} - a^{2} c^{2} f\right )} \sin \left (f x + e\right )}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{\left (a \left (\sec {\left (e + f x \right )} + 1\right )\right )^{\frac {3}{2}} \left (- c \left (\sec {\left (e + f x \right )} - 1\right )\right )^{\frac {3}{2}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 2.18, size = 153, normalized size = 1.51 \begin {gather*} -\frac {\frac {4 \, \log \left ({\left | c \right |} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2}\right )}{\sqrt {-a c} a {\left | c \right |}} + \frac {8 \, \sqrt {-a c} \log \left ({\left | c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + c \right |}\right )}{a^{2} c {\left | c \right |}} - \frac {{\left (c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - c\right )} \sqrt {-a c}}{a^{2} c^{2} {\left | c \right |}} - \frac {4 \, c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - c}{\sqrt {-a c} a c {\left | c \right |} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2}}}{8 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {1}{{\left (a+\frac {a}{\cos \left (e+f\,x\right )}\right )}^{3/2}\,{\left (c-\frac {c}{\cos \left (e+f\,x\right )}\right )}^{3/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________